<!DOCTYPE html>
<?php if (!is_fang90_server_name()) : ?>
<!-- 
┏┓╋┏┓╋┏┓╋╋╋╋╋╋┏━┓
┃┃╋┃┃╋┃┃╋╋╋╋╋╋┃┏┛
┃┃╋┃┣━┛┣┳━━┳━┳┛┗┳━━┳━┓┏━━┓
┃┃╋┃┃┏┓┣┫┏┓┃┏╋┓┏┫┏┓┃┏┓┫┏┓┃
┃┗━┛┃┗┛┃┃┏┓┃┃┃┃┃┃┏┓┃┃┃┃┗┛┃
┗━━━┻━━┻┻┛┗┻┛┗┻┛┗┛┗┻┛┗┻━┓┃
╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋┏━┛┃
╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋┗━━┛

http://udfang.com
Work with us? We're a fun bunch!  http://udfang.com/about
-->
<?php endif; ?>
<html lang="zh-CN">

<head>
    <title><?php e($building->info->seo_title); ?></title>
    <meta content='IE=Edge' http-equiv='X-UA-Compatible'>
    <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'>
    <link rel="shortcut icon" type="image/x-icon" href="/<?php if(is_udfang_server_name()) : ?>favicon.ico<?php else : ?>f90.ico<?php endif; ?>" />
    <meta name="viewport" content="width=device-width, initial-scale=1,  minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <meta content='<?php e($building->info->seo_keywords); ?>' name='keywords'>
    <meta content='<?php e($building->info->seo_description); ?>' name='description'>
    <?php if(!is_fang90_server_name()) : ?>
    <link rel="canonical" href="<?php echo site_url("building/{$city_code}/{$building->id}"); ?>">
    <?php endif; ?>
    <link rel="stylesheet" href="/assets/css/building/reset.css" />
    <link rel="stylesheet" href="/assets/css/building/index.css?v=0711" />
    <link rel="stylesheet" href="/assets/css/building/landingpage.css?v=0725" />
    <link rel="stylesheet" href="/assets/css/building/photoswipe.css" />
    <link rel="stylesheet" href="/assets/css/building/default-skin.css" />
    <?php if(is_fang90_server_name()) : ?>
	<link rel="stylesheet" href="/assets/css/building/landingpage-fang90.css" />
	<?php endif; ?>
    <style type="text/css">
    .house-address{
        color: #f95e66!important;
        font-weight: bolder;
        background: url(/assets/images/building/house-address-red.png) left center no-repeat!important;
    }
    .house-address:hover{
        color: #f82e3b!important;
    }
    <?php if($building->id == 1691): ?>
    /*装修类*/
    .callme .username {
        width: 198px;
        height: 33px;
        line-height: 33px;
        border: 1px solid #c4c4c4;
        padding-left: 9px;
        display: block;
        font-weight: bold;
        display:inline;
    }
    .yuyue_top_name, .yuyue_top_number{
        width: 198px;
        height: 33px;
        line-height: 33px;
        border: 1px solid #c4c4c4;
        padding-left: 9px;
        display: block;
        font-weight: bold;
        display:inline;
    }
    .callme .book , .book{
        height: 33px;
        line-height: 33px;
        border: 1px solid #fc5a5f;
        border-radius: 2px;
        color: #fff;
        margin: 0 1px;
        background: #fc5c63 5px center no-repeat;
        padding: 0 10px 0 10px;
    }
    .input-group-button{
        width: 260px;
        height: 50px;
        color: #fff;
        background: #fc5c63 27% center no-repeat;
        padding-left: 10px;
        border: none;
        border-radius: 3px;
    }
    <?php endif; ?>
    <?php if(in_array($building->id, [1615,1649,1650,1671,1659])): ?>
        .telnum{
            color: #fff;
            font-size: 24px;
            display: inline-block;
            padding-left: 56px;
        }
        @media only screen and (max-width: 875px) {
            .telnum{
                display: block;
                padding-left: 0;
                padding-top: 5px;
            }
            .hero .phone .number{
                margin-left: 0;
                margin-top: -45px;
            }
            .hero .phone .freecall{
                margin-top: -45px;
            }
        }
        .hero .phone .number {
            width: 207px;
            margin-left: 144px;
        }
    <?php endif; ?>
    </style>
</head>

<body>
    <nav class='header'>
        <div class='wrapper'>
            <div class='inner'>
                <?php if (!is_fang90_server_name()) : ?>
                <a class='logo' href='/'><span class="icon-udf"></span></a>
                <div class='right'><a class='share' href='#'> 分享 </a>
                    <div class="share-list">
                        <a href="javascript:void(0)" class="weixin">微信</a>
                        <a href="javascript:void(0)" class="qq">QQ空间</a>
                        <a href="javascript:void(0)" class="sina">新浪微博</a>
                    </div>
                </div>
                <?php endif; ?>
            </div>
        </div>
    </nav>
    <section class="hero">
        <div class="gradient"></div>
        <picture>
            <!--[if IE 9]><video style="display: none;"><![endif]-->
            <?php if ($is_pad): ?>
            <source media="(min-width:760px)" srcset="<?php e($building->photos['lpdb']['mobile'][0]->absolute_url); ?>">
            <?php else: ?>
            <source media="(min-width:760px)" srcset="<?php e($building->photos['lpdb']['pc'][0]->absolute_url); ?>">
            <?php endif; ?>
            <!--[if IE 9]></video><![endif]-->
            <img srcset="<?php e($building->photos['lpdb']['mobile'][0]->absolute_url); ?>" alt="">
        </picture>
        
        <?php if ($building->info->phone_switch == 1): ?>
        <div class="phone <?php if (is_fang90_server_name()) : ?>phone-fang90<?php endif; ?>">
        	<div class="phone-fang90-inner clearfix">
                <?php if (is_fang90_server_name()) : ?>
	        	<div class="grade">
                    <?php if($building->info->price_desc != ''): ?>
                        <p class="price"><?php echo $building->info->price_desc; ?></p>
		            <?php elseif($building->id == '1620'): ?>
                        <p class="price"><?php e($building->info->price_desc) ?></p>
                    <?php else: ?>
		                <p class="price">
                            <?php if($building->id == '1619'): ?>
                                起价：
                            <?php else: ?>
                                均价：
                            <?php endif; ?>
		                    <?php if ($building->ave_price != 0): ?>
		                        <span>¥<?php e($building->ave_price); ?></span>元/平米<?php if($building->id == '1627') e("起") ?>
		
		                    <?php else: ?>
		                        价格待定
		                    <?php endif; ?>
		                </p>
		            <?php endif; ?>
		            <p>
                        <span class="house-address" style="margin-right:10px;">获取楼盘地址</span>
		                <span class="discount-note">优惠通知</span>
                        <span class="change-price">变价通知</span>
		            </p>
		        </div>
               <?php endif; ?> 
		        <div class="phone-input">
		        	<?php if(in_array($building->id, [1615,1649,1650,1671,1659]) && !is_fang90_server_name()): ?><p class="telnum"><?php if($is_mobile) {
	                    echo ($channel=='other' || strlen($building->phone['mobile']->number) <= 5) ? $building->telephone.' 转 '.$building->phone['mobile']->number : $building->phone['mobile']->number;
	                }else{
	                    echo $building->telephone.' 转 '.$building->phone['pc']->number;
	                } ?></p><?php endif; ?>
		            <input class="number" type="text" placeholder="请输入您的号码" maxlength="11" />
		            <input class="freecall" type="button" value="一键免费通话" event-name="一键免费通话_顶部" id="free_call_top" />
		        </div>
        	</div>
        </div>
        <?php endif; ?>
        <!-- 巧客网特殊处理S-->
        <?php if ($building->id == '1691'): ?>
            <div class="phone <?php if (is_fang90_server_name()) : ?>phone-fang90<?php endif; ?>">
                <div class="phone-fang90-inner clearfix">
                    <div class="phone-input" style="width:100%;">
                        <?php if (!$is_mobile) : ?>
                        <input type="text" class="yuyue_top_name" placeholder="请输入您的称呼" maxlength="11" id="pc_yuyue_username_top" />
                        <input type="text" class="yuyue_top_number" placeholder="请输入您的号码" maxlength="11" />
                        <input type="button" class="book" value="预约免费量房" event-name="立即预约" id="yuyue_kan_fang" <?php if (is_fang90_server_name()) : ?>style="border:1px solid #13b5b1;background:#13b5b1 5px center no-repeat"<?php endif; ?> />
                        <?php else : ?>
                        <input type="button" class="book input-group-button" value="预约免费量房" event-name="立即预约" id="yuyue_kan_fang" <?php if (is_fang90_server_name()) : ?>style="border:1px solid #13b5b1;background:#13b5b1 5px center no-repeat"<?php endif; ?>/>
                        <?php endif;?>
                    </div>
                </div>
            </div>
        <?php endif; ?>
        <!-- 巧客网特殊处理E-->
    </section>
    <?php if (!is_fang90_server_name()) : ?>
    <section class="building">
        <?php $titleAll = ($building->ave_price==0 && empty($building->info->address)) ? true : false; ?>
        <div class="house">
            <div class="title <?php if ($titleAll): ?>title-all<?php endif; ?>">
                <p class="name"><?php e($building->name); ?></p>
                <p class="label"><?php if ($building->tag): foreach ($building->tag['putong'] as $ptTag) : ?><span><?php e($ptTag->tag_name); ?></span><?php endforeach; endif; ?></p>
            </div>
            <?php if (!$titleAll){ ?>
            <div class="grade">
                <?php if($building->info->price_desc != ''): ?>
                    <?php echo $building->info->price_desc; ?>
                <?php else: ?>
                    <?php if($building->id == '1649'): ?>
                        <p class="price">总价：<span>1000</span>万起</p>
                    <?php else: ?>
                        <p class="price">均价：
                            <?php if ($building->ave_price != 0): ?>
                                <span>¥<?php e($building->ave_price); ?></span>元/平米<?php if($building->id == '1627') e("起") ?>

                            <?php else: ?>
                                价格待定
                            <?php endif; ?>
                        </p>
                    <?php endif; ?>
                <?php endif; ?>
                <p>
                    <span class="house-address" style="margin-right:10px;">获取楼盘地址</span>
                    <span class="discount-note">优惠通知</span>
                    <span class="change-price">变价通知</span>
                </p>
            </div>
            <?php } ?>
            <div class="detail clearfix">
                <p><?php e($building->info->recommend_info); ?></p>
            </div>
        </div>
    </section>
    <?php endif; ?>
    <div class="landing-page">
    <section class="modular-lists">
    <?php foreach ($building->photos['tstp']['pc'] as $key => $pcPhoto) : ?>
        <div class="modular-list m1">
            <picture>
                <!--[if IE 9]><video style="display: none;"><![endif]-->
                <source <?php if (!$is_ie) e('data-'); ?>srcset="<?php $mbPhotoArr = $building->photos['tstp']['mobile']; 
                    if (count($mbPhotoArr) >= $key+1) {
                        e($mbPhotoArr[$key]->absolute_url);
                    } ?>" media="(max-width: 760px)">
                <source <?php if (!$is_ie) e('data-'); ?>srcset="<?php e($pcPhoto->absolute_url); ?>" media="(max-width: 1400px)">
                <source <?php if (!$is_ie) e('data-'); ?>srcset="<?php e($pcPhoto->absolute_url); ?>">
                <!--[if IE 9]></video><![endif]-->
                <img class="lazyload<?php if ($is_ie) echo '_disable'; ?>"  <?php if ($is_ie): ?>srcset="<?php e($pcPhoto->absolute_url); ?>"<?php endif; ?> src="/assets/images/building/blank.png" alt="">
            </picture>
        </div>
    <?php endforeach; ?>
        <!-- <div class="modular-list m3">
            <div class="desc left">
                <h5>顾村中学</h5>
                <div>
                    <p>顾村中学创办于一九四四年。一九五八年秋开始招收高一新生，成为完全中学，一九八二年起，全国政协委员，香港著名实业家、校友刘浩清先生和夫人孔爱菊女士捐资助学，为母校的发展作出了重要的贡献。</p>
                </div>
                <a href="javascirpt:void(0)">了解顾村中学</a>
            </div>
            <div class="pic right"><img src="/assets/images/building/landingpage/ad3.png"></div>
            <div class="clearfix"></div>
        </div>
        <div class="modular-list m4">
            <img src="/assets/images/building/landingpage/ad4-b.png">
        </div>
        <div class="modular-list m5">
            <div class="desc left">
                <h6>户型</h6>
                <div>
                    <p class="bold">13米南向面宽，3.6米主卧套间</p>
                    <p class="bold">打造墅级奢华品质</p>
                    <br>
                    <p>面宽约13米，是常规联排别墅面宽的2倍，横厅面宽约6.4m，堪比独栋别墅</p>
                    <p>更大面宽，更大气派，更大舒适</p>
                </div>
                <a href="javascirpt:void(0)">进一步了解</a>
            </div>
            <div class="pic right"><img src="/assets/images/building/landingpage/ad5-b.png"></div>
            <div class="clearfix"></div>
        </div> -->
    </section>
    <?php if (!empty($building->info->address) && !empty($building->info->sale_address)): ?>
    <section class="info">
        <div class="inner">
            <h3>楼盘信息</h3>
            <div class="info-list">
                <div class="info-left">
                    <?php if ($building->open_time): ?><p><span>开盘时间</span><span><?php e($building->open_time); ?></span></p><?php endif; ?>
                    <?php if ($building->info->address): ?><p><span>楼盘地址</span><span><?php e($building->info->address); ?></span></p><?php endif; ?>
                    <?php if ($building->info->floor_space): ?><p><span>占地面积</span><span><?php e($building->info->floor_space); ?>平米</span></p><?php endif; ?>
                    <?php if ($building->vendor): ?>
                        <p>
                            <?php if($building->id == "1755"): ?>
                                <span>权利人</span>
                            <?php else: ?>
                                <span>开发商</span>
                            <?php endif; ?>
                            <span><?php e($building->vendor->developer_name); ?></span>
                        </p>
                    <?php endif; ?>
                    <?php if ($building->info->lvhua_lv): ?><p><span>绿化率</span><span><?php e($building->info->lvhua_lv); ?>%</span></p><?php endif; ?>
                    <?php if ($building->info->chewei_shu): ?><p><span>车位数</span><span><?php e($building->info->chewei_shu); ?></span></p><?php endif; ?>
                    <?php if ($building->info->chanquan_n): ?>
                        <p><span>产权年限</span><span>
                        <?php if ($building->info->chanquan_n == '-1') { ?><?php echo "永久"; ?>   
                        <?php }else{ ?>
                            <?php e($building->info->chanquan_n); ?>年
                        <?php } ?>
                        </span></p><?php endif; ?>
                    <?php if ($building->info->zhuangxiu_bz): ?><p><span>装修标准</span><span><?php e($building->info->zhuangxiu_bz); ?></span></p><?php endif; ?>
                    <?php if ($building->info->wuye_fei): ?><p><span>物业费</span><span><?php e($building->info->wuye_fei); ?>元/平米</span></p><?php endif; ?>
                </div>
                <div class="info-right">
                    <?php if ($building->pass_time): ?><p><span>交房时间</span><span><?php e($building->pass_time); ?></span></p><?php endif; ?>
                    <?php if ($building->info->sale_address): ?><p><span>售楼处地址</span><span><?php e($building->info->sale_address); ?></span></p><?php endif; ?>
                    <?php if ($building->info->all_space): ?><p><span>建筑面积</span><span><?php e($building->info->all_space); ?>平米</span></p><?php endif; ?>
                    <?php if ($building->info->rongji_lv): ?><p><span>容积率</span><span><?php e($building->info->rongji_lv); ?></span></p><?php endif; ?>
                    <?php if ($building->info->guihua_shu): ?><p><span>规划户数</span><span><?php e($building->info->guihua_shu); ?></span></p><?php endif; ?>
                    <?php if ($building->info->chewei_bi): ?><p><span>车位比</span><span><?php e($building->info->chewei_bi); ?></span></p><?php endif; ?>
                    <?php if ($building->info->zhuangxiu_qk): ?><p><span>装修情况</span><span><?php e($building->info->zhuangxiu_qk); ?></span></p><?php endif; ?>
                    <?php if ($building->info->wuye_gs): ?><p><span>物业公司</span><span><?php e($building->info->wuye_gs); ?></span></p><?php endif; ?>
                </div>
                <div class="clearfix"></div>
            </div>
        </div>
    </section>
    <?php endif; ?>
    </div>
    <?php if ($related_items) : ?>
    <section class="similar">
        <div class="title">
            <h3>相关楼盘</h3>
        </div>
    </section>
    <section class="similar">
        <div class="inner">
            <div class="similar-last"></div>
            <ul class="similar-list">
            <?php $similarNumber = 0; ?>
            <?php foreach ($related_items as $key => $buildingItem) : ?>
            <?php $similarNumber++; if ($similarNumber < 5) : ?>
                <li class="similar-grid-block">
                    <a href="<?php echo "/building/{$buildingItem->city->code}/{$buildingItem->id}/campaign"; ?>">
                        <img data-src="<?php e($buildingItem->cover_absolute_url); ?>" class="lazyload">
                        <p class="name"><?php e($buildingItem->name); ?></p>
                        <p class="price"><?php if ($buildingItem->ave_price != 0): ?><span>¥<?php e($buildingItem->ave_price); ?></span>元/平米<?php else: ?>价格待定<?php endif; ?></p>
                        <p class="number"><?php if ($buildingItem->tag): foreach ($buildingItem->tag['putong'] as $ptTag) : ?><span><?php e($ptTag->tag_name); ?></span><?php endforeach; endif;?></p>
                    </a>
                </li>
            <?php endif; ?>
            <?php endforeach; ?>
            </ul>
            <div class="similar-next"></div>
            <div class="clearfix"></div>
        </div>

        <ul class="similar-list-back" style="display: none;">
            <?php $similarNumber = 0; ?>
            <?php foreach ($related_items as $key => $buildingItem) : ?>
            <?php $similarNumber++; if ($similarNumber >= 5) : ?>
                <li class="similar-grid-block">
                    <a href="<?php echo "/building/{$buildingItem->city->code}/{$buildingItem->id}/campaign"; ?>">
                        <img data-src="<?php e($buildingItem->cover_absolute_url); ?>" class="lazyload">
                        <p class="name"><?php e($buildingItem->name); ?></p>
                        <p class="price"><?php if ($buildingItem->ave_price != 0): ?><span>¥<?php e($buildingItem->ave_price); ?></span>元/平米<?php else: ?>价格待定<?php endif; ?></p>
                        <p class="number"><?php if ($buildingItem->tag): foreach ($buildingItem->tag['putong'] as $ptTag) : ?><span><?php e($ptTag->tag_name); ?></span><?php endforeach; endif;?></p>
                    </a>
                </li>
            <?php endif; ?>
            <?php endforeach; ?>
        </ul>

    </section>
    <?php endif; ?>
    <section class='footer-simple'>
        <div class='inner'>
        <?php if (is_fang90_server_name()) : ?>
            © 2015-2016 <?php e(strtoupper($_SERVER['HTTP_HOST'])); ?><br class="foot-br"> 保留所有权 沪ICP备 <?php if(is_plusfang_server_name()) : ?>16045141号-1<?php else : ?>16025960号-1<?php endif; ?>
        <?php else : ?>
            © 2015-2016 <a href="/"><?php e(strtoupper($_SERVER['HTTP_HOST'])); ?></a><br class="foot-br"> 保留所有权 沪ICP备 13042777号-3
        <?php endif; ?>
        </div>
    </section>
    <ul class="fixed_rigth">
        <li>
            <a style="display:none;" class="goto_top fixed_a4 fixed_a" href="javascript:void(0)"></a>
        </li> 
    </ul>
    <div class="callmetip"></div>
    <div class="callme">
        <?php if ($building->id == '1691' && !$is_mobile) : ?>
        <input type="text" class="username username-check get-username" placeholder="请输入您的称呼" maxlength="11" id="pc_yuyue_username" />
        <?php endif;?>
        <input type="text" class="number number-check" placeholder="请输入您的号码" maxlength="11" />
        <?php if ($building->info->phone_switch == 1): ?>
        <input type="button" class="freecall" value="一键免费通话" event-name="一键免费通话_底部" id="free_call_bottom" />
        <?php endif; ?>
        <input type="button" class="book" value="立即预约" event-name="立即预约" id="yuyue_kan_fang" <?php if (is_fang90_server_name() && $building->id == '1691') : ?>style="border:1px solid #13b5b1;background:#13b5b1 5px center no-repeat"<?php endif; ?> />
        <?php if ($building->huxing) : ?>
        <input type="button" class="layout" value="户型" />
        <?php endif; ?>
    </div>

    <!--验证码弹框-->
    <div class="tips_yzm wp_tips_yzm" style="display:none">
        <div id='yzmvid_2' class="yzm_wrap2">
            <input class='mfzxyzmip_2' type='text' placeholder='请输入验证码'/>
            <img id='mfzxyzm_2' src="" />
            <span class='hyp_2'>换一个</span>
        </div>
        <button id='tips_yzm_ok'>确定</button>
        <button id='tips_yzm_close'>关闭</button>
    </div>
    <!--/验证码弹框-->

    <!--底部电话号码验证提示框-->
    <div class="tips" style="display:none">
        <p></p>
        <button>确定</button>
    </div>
    <!--/底部电话号码验证提示框-->

    <!--弹出咨询-->
    <div class="tanchu_mask" style="display: none;"></div>
    <div class="tanchu tanchu_1" style="display:none">
        <div class="titlebar">
            <button class="close"></button>
            <h5>一键免费通话</h5>
        </div>
        <div class="textbar">
            <p><span>1.输入手机号</span><span class="arrow-to-right"></span><span>2.电话确认成功</span></p>
            <input class="phone-input" type="text" placeholder="请输入号码" value="" />
            <div class="wrong-input wrong-input1">手机号输入错误</div>
            <div class="random">
                <input class='code-input' type='text' placeholder='请输入验证码' id="captcha_code_input" />
                <img src="/buildings/front/building/captcha" alt="" id="captcha_img">
                <a href="javascript:void(0)" onclick="reloadCaptcha();">换一张</a>
                <div class="clearfix"></div>
            </div>
            <div class="wrong-input wrong-input2">验证码输入错误</div>
            <div class="wrong-input wrong-input3">验证码输入错误</div>
            <input id="BtnPhone_5" class="SubBtn SubBtn_dh" type="submit" value="一键免费通话" event-name="一键免费通话_顶部" />
        </div>
    </div>
    <!--/弹出咨询-->

    <!--弹出提示-->
    <div class="tanchu tanchu_2 tanchu_ok" style="display: none;">
        <div class="titlebar">
            <button class="close"></button>
        </div>
        <div class="textbar">
            <p id='tanchuang_ok'>恭喜，预约现场看房成功！</p>
            <input class="SubBtn SubBtn_tc2" type="button" value="确定" />
        </div>
    </div>
    <div class="tanchu tanchu_2 tanchu_4" style="display: none;">
        <div class="titlebar">
            <button class="close"></button>
        </div>
        <div class="textbar">
            <p>请正确输入手机号！</p>
            <input class="SubBtn SubBtn_tc2" type="button" value="确定" />
        </div>
    </div>
    <!--/弹出提示-->

    <div class="tanchu tanchu-mobile tanchu_3" style="display: none;">
        <div class="titlebar">
            <button class="close"></button>
            <h5><?php if ($building->id == '1691'): ?>预约免费量房<?php else : ?>立即预约看房<?php endif;?></h5>
        </div>
        <div class="textbar">
            <p><span>1.输入手机号</span><span class="arrow-to-right"></span><span>2.预约成功</span></p>
            <?php if ($building->id == '1691') : ?>
                <input class="phone-input get-username" type="text" placeholder="请输入称呼" value="" id="yuyue_username" />
            <?php endif;?>
            <input class="phone-input" type="text" placeholder="请输入手机号" value="" id="yuyue_mb" />
            <div class="random" style="display:none;">
                <input class='code-input' type='text' placeholder='请输入验证码' id="phone_code_yuyemb_input" style="margin-left:0;" />
                <button class="sms-btn code-btn" onclick="refreshPhoneCode($('#yuyue_mb').val());" style="margin-right:30px;">获取验证码</button>
                <div class="clearfix"></div>
            </div>
            <div class="wrong-input wrong-input2" id="wrong-input-phone-code-yuyue-mb">验证码输入错误</div>
            <input id="BtnPhone_6" class="SubBtn SubBtn_dh" type="submit" value="<?php if ($building->id == '1691'): ?>立即预约免费量房
<?php else : ?>预约看房<?php endif;?>" event-name="立即预约" />
            <!-- <p>通过免费通话获得更详细的咨询和帮助！</p> -->
        </div>
    </div>

    <div class="tanchu tanchu_6" style="display: none;">
        <div class="titlebar">
            <button class="close"></button>
            <h5>一键免费通话</h5>
        </div>
        <div class="textbar">
            <p>正在拨打电话: <span class="phone-number"></span></p>
            <p class="loading">请稍后</p>
            <p class="small">关闭对话框不会影响您的通话</p>
        </div>
    </div>

    <div class="tanchu tanchu_7 tc_3" style="display: none;">
        <div class="titlebar">
            <button class="close"></button>
            <h5 id="tc_3_h">立即预约</h5>
        </div>
        <div class="textbar">
            <p><img src="/assets/images/building/success.png" alt=""></p>
            <p id="tc_3_p">预约看房成功</p>
        </div>
    </div>

    <div class="tanchu tanchu_8" style="display: none;">
        <div class="titlebar">
            <button class="close"></button>
            <h5>变价通知</h5>
        </div>
        <div class="textbar">
            <p><span>变价消息会通过短信通知您</span></p>
            <input id="changePriceNum" class="phone-input" type="text" placeholder="请输入号码" value="" />
            <input id="BtnPhone_8" class="SubBtn SubBtn_dh" type="submit" value="确认" />
        </div>
    </div>

    <div class="tanchu tanchu_9" style="display: none;">
        <div class="titlebar">
            <button class="close"></button>
            <h5>优惠通知</h5>
        </div>
        <div class="textbar">
            <p><span>优惠消息会通过短信通知您</span></p>
            <input id="discount-note-9" class="phone-input" type="text" placeholder="请输入号码" value="" />
            <input id="BtnPhone_9" class="SubBtn SubBtn_dh" type="submit" value="确认" />
        </div>
    </div>

    <div class="tanchu tanchu_10" style="display: none;">
        <div class="titlebar">
            <button class="close"></button>
            <h5>获取楼盘地址</h5>
        </div>
        <div class="textbar">
            <p><span>以下信息将会发送到您的手机：</span></p>
            <p><?php echo $building->info->address?></p>
            <!-- <p><span>请耐心等待3~5分钟...</span></p> -->
            <input id="sendMess" class="phone-input" type="text" placeholder="请输入号码" value="" />
            <div class="random" style="display:none; margin-left:5%;">
                <input class='code-input' type='text' placeholder='请输入验证码' id="phone_code_address_input" style="margin-left:0;" />
                <button class="sms-btn code-btn" onclick="refreshPhoneCode($('#sendMess').val());" style="margin-right:18px;">获取验证码</button>
                <div class="clearfix"></div>
            </div>
            <input id="BtnPhone_10" class="SubBtn SubBtn_dh" type="submit" value="发送到手机" />
        </div>
    </div>

    <!--拨打电话功能 验证手机验证码-->
    <div class="tanchu tanchu_11" style="display:none">
        <div class="titlebar">
            <button class="close"></button>
            <h5>手机验证码</h5>
        </div>
        <div class="textbar">
            <p><span>1.手机验证码</span><span class="arrow-to-right"></span><span>2.电话确认成功</span></p>
            <div class="random">
                <input class='code-input' type='text' placeholder='请输入验证码' id="phone_code_input" />
                <input type="hidden" id="phone_code_input_hidden" value="" style="display:none;" />
                <button class="sms-btn code-btn" onclick="refreshPhoneCode($('.number').val());" style="margin-right:15px;">获取验证码</button>
                <div class="clearfix"></div>
            </div>
            <div class="wrong-input wrong-input2" id="wrong-input-phone-code">验证码输入错误</div>
            <input id="BtnPhone_auth_code" class="SubBtn SubBtn_dh" type="submit" value="一键免费通话" event-name="一键免费通话_顶部" />
        </div>
    </div>
    <!--/拨打电话功能 验证手机验证码-->

    <!--PC预约看房 验证手机验证码-->
    <div class="tanchu tanchu_12" style="display:none">
        <div class="titlebar">
            <button class="close"></button>
            <h5>手机验证码</h5>
        </div>
        <div class="textbar">
            <p><span>1.手机验证码</span><span class="arrow-to-right"></span><span><?php if ($building->id == '1691'): ?>2.预约量房成功<?php else : ?>2.预约看房成功<?php endif;?></span></p>
            <div class="random">
                <input class='code-input' type='text' placeholder='请输入验证码' id="phone_code_yuyue_input" />
                <input type="hidden" id="phone_code_yuyue_input_hidden" value="" style="display:none;" />
                <button class="sms-btn code-btn" onclick="refreshPhoneCode($('.number').val());" style="margin-right:15px;">获取验证码</button>
                <div class="clearfix"></div>
            </div>
            <div class="wrong-input wrong-input2" id="wrong-input-phone-code-yuyue">验证码输入错误</div>
            <input id="BtnPhone_auth_code_yuyue" class="SubBtn SubBtn_dh" type="submit" value="<?php if ($building->id == '1691'): ?>预约免费量房<?php else : ?>预约看房<?php endif;?>" />
        </div>
    </div>
    <!--/PC预约看房 验证手机验证码-->
    
    <span class="bdsharebuttonbox" style="display: none;">
        <a title="分享到微信" href="#" class="bds_weixin" data-cmd="weixin"></a>
        <a title="分享到新浪微博" href="#" class="bds_tsina" data-cmd="tsina"></a>
        <a title="分享到QQ空间" href="#" class="bds_qzone" data-cmd="qzone"></a>
    </span>

    <div class="my-simple-gallery" itemscope>
        <?php
            if ($building->huxing) :
            foreach ($building->huxing as $key=>$value) :
            if($is_mobile):  
            foreach ($value['mobile'] as $k=>$v) :
        ?>
            <figure itemscope style="">
                <a href="<?php echo $v->absolute_url;?>" itemprop="contentUrl" data-size="<?php if ($building->id >= '1633'){echo "1080x1380";}else{echo "640x500";} ?>">
                    <img class="lazy" data-original="<?php echo $v->absolute_url;?>" width="0" height="0" 
                    src="/assets/images/building/blank.png"/>
                </a>
            </figure>
        <?php 
            endforeach;
            else:
            foreach ($value['pc'] as $k=>$v) :
        ?>
            <figure itemscope style="">
                <a href="<?php echo $v->absolute_url;?>" itemprop="contentUrl" data-size="<?php if ($building->id >= '1633'){echo "1400x1400";}else{echo "1200x600";} ?>">
                    <img class="lazy" data-original="<?php echo $v->absolute_url;?>" width="0" height="0" 
                    src="/assets/images/building/blank.png"/>
                </a>
            </figure>
        <?php  
            endforeach;
            endif; 
            endforeach;
            endif; 
        ?>
    </div>
    <div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="pswp__bg"></div>
        <div class="pswp__scroll-wrap">
            <div class="pswp__container">
                <div class="pswp__item"></div>
                <div class="pswp__item"></div>
                <div class="pswp__item"></div>
            </div>
            <div class="pswp__ui pswp__ui--hidden">
                <div class="pswp__top-bar">
                    <div class="pswp__counter"></div>
                    <button class="pswp__button pswp__button--close" title="关闭"></button>
                    <?php if(!$is_mobile): ?>
                    <button class="pswp__button pswp__button--share" title="分享"></button>
                    <?php endif; ?>
                    <button class="pswp__button pswp__button--fs" title="全屏"></button>
                    <button class="pswp__button pswp__button--zoom" title="缩放"></button>
                    <div class="pswp__preloader">
                        <div class="pswp__preloader__icn">
                            <div class="pswp__preloader__cut">
                                <div class="pswp__preloader__donut"></div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
                    <div class="pswp__share-tooltip"></div>
                </div>
                <button class="pswp__button pswp__button--arrow--left" title="上一张">
                </button>
                <button class="pswp__button pswp__button--arrow--right" title="下一张">
                </button>
                <div class="pswp__caption">
                    <div class="pswp__caption__center"></div>
                </div>
            </div>
        </div>
    </div>

    <script type="text/javascript">
        var isFang90com = <?php echo is_fang90_server_name() ? 1 : 0 ?>;
        var isMobile = <?php echo $is_mobile ? 1 : 0; ?>;
    </script>
    
    <script src="/assets/js/building/jquery-1.11.1.min.js"></script>
    <script src="/assets/js/building/share.js"></script>
    <script src="/assets/js/building/photoswipe.min.js"></script>
    <script src="/assets/js/building/photoswipe-ui-default.js"></script>
    <script src="/assets/js/building/landingpage.js?v=0802"></script>
    <script src="/assets/js/building/picturefill.js"></script>
    <script src="/assets/js/building/backtotop.js"></script>
    <script src="/assets/js/building/jquery.scrollstop.js"></script>
    <script src="/assets/js/building/lazysizes.js"></script>
    <script src="/assets/js/building/common.js?v=0720"></script>
    <script src="/assets/js/building/jquery.lazyload.js" ></script>

    <script type="text/javascript">
    // $(document).on("click", "[event-track]", function() {
    //     var e = $(this).attr("event-name");
    //     alert(e);
    // });

    var view_building_log_id = <?php echo $view_log['view_building_log_id']; ?>;
    var view_log_time = <?php echo time(); ?>;
    var buildingName = "<?php echo $building->name; ?>";
    var building_code = "<?php echo $building->code; ?>";
    var building_pc_phone = "<?php echo empty($building->phone) ? '' : $building->phone['pc']->number;  ?>";
    var building_mobile_phone = "<?php echo empty($building->phone) ? '' : $building->phone['mobile']->number;  ?>";
    var buildingPhoneExt = <?php if ($is_mobile || $is_pad): ?>building_mobile_phone<?php else: ?>building_pc_phone<?php endif; ?>; // 分机号
    var buildingCookieId = "<?php echo $view_log['building_cookie_id']; ?>";
    var buildingChannel = "<?php echo $channel; ?>";
    var buildingId = <?php echo $building->id; ?>;
    (function(){
        var isPad = <?php echo $is_pad; ?>;

        // 免费咨询
        $(".freecall").click(function(){
            var eventName = $(this).attr("event-name");
            if (isMobile && isPad==0) {
                // 移动端
                location.href = '<?php 
                    $building_mobile_phone = empty($building->phone) ? '' : $building->phone['mobile']->number;
                    $phoneStr = ($channel=='other' || strlen($building_mobile_phone) <= 5) ? $building->telephone.','.$building_mobile_phone : $building_mobile_phone;
                    echo 'tel:'.$phoneStr; 
                ?>';
                // usure
                eventClickUSure('', eventName=="一键免费通话_顶部"?1:2);
                editCtoBtnuseraction('', 2);
                buildingEventLog(eventName, '');
                // 思盈
                siyin_event("mob_freecall", "5c07aa1b91e7dff9faf6033e1da0348b", "");
                //秒针
                stm_clicki('send', 'event', '免费通话', '点击');
                // 百度
                _hmt.push(['_trackPageview', '/mfth']);
            } else {
                var mobile = $(".number").val();
                // 不输手机号码placeholder变红
                if (mobile == ""){
                    $(".number").addClass("empty-input");
                    return false;
                }
                // 手机号不符合正则表达式变红
                if (!mobile.match(/^1[3|4|5|7|8]\d{9}$/)){
                    $(".number").addClass("warning-input");
                    return false;
                }
                // usure
                eventClickUSure(mobile, eventName=="一键免费通话_顶部"?1:2);
                editCtoBtnuseraction(mobile, 0);
                // 思盈
                siyin_event("pc_freecall", "9b6f89c389b8d4c6a0e269da85a8927c", mobile);
                //秒针
                stm_clicki('send', 'event', '免费通话', '点击');
                // 先新增楼盘事件，获取电话记录id
                $.getJSON("/buildings/front/building/addEventLog",{view_building_log_id:view_building_log_id, event:eventName, phone:mobile, building_code:building_code, channel:buildingChannel
                },function(logJson) {
                    // console.log(data);
                    if (logJson.phone_log_id) {
                        $.ajax({
                            method: "GET",
                            url: "/buildings/front/building/sendCcic2Zixun",
                            data: {mobile:mobile, tel_ext:building_pc_phone, building_id:buildingId, phone_log_id:logJson.phone_log_id}
                        }).done(function(data){
                            if (data == 'ok') {
                                // 弹出电话正在接通中
                                $(".phone-number").html(mobile);
                                $(".tanchu_mask").show();
                                $(".tanchu_6").show();
                                $(".number").val("");
                                // 品友
                                signUpCvtN('拨打电话', buildingName);
                                // 百度
                                _hmt.push(['_trackPageview', '/mfth']);
                            } else if (data == 'yzm') {
                                $(".phone-input").val(mobile);
                                $(".tanchu_mask").show();
                                $(".tanchu_1").show();

                            }else if (data == 'auth_code') {
                                // 需要手机验证码
                                $("#phone_code_input_hidden").val(mobile);
                                $(".tanchu_mask").show();
                                $(".tanchu_11").fadeIn();
                            } else {
                                alert(data);
                            }
                        })
                    } else {
                        // alert(data);
                    }
                })
            }
        });

        // 提交拨打电话验证码
        $("#BtnPhone_auth_code").click(function(){
            var phone_code = $("#phone_code_input").val();
            var mobile = $("#phone_code_input_hidden").val();
            $.getJSON("/buildings/front/building/ajaxVerifyPhoneCode",{mobile:mobile, phone_code:phone_code},function(logJson) {
                if (logJson.status == 'ok') {
                    $("#wrong-input-phone-code").fadeOut();
                    $(".freecall").click();
                    $(".tanchu_11").fadeOut();
                }else{
                    $("#wrong-input-phone-code").fadeIn();
                }
            });
        });
        // 提交PC预约看房验证码
        $("#BtnPhone_auth_code_yuyue").click(function(){
            var phone_code = $("#phone_code_yuyue_input").val();
            var mobile = $("#phone_code_yuyue_input_hidden").val();
            $.getJSON("/buildings/front/building/ajaxVerifyPhoneCode",{mobile:mobile, phone_code:phone_code},function(logJson) {
                if (logJson.status == 'ok') {
                    $("#wrong-input-phone-code-yuyue").fadeOut();
                    $(".book").click();
                    $(".tanchu_12").fadeOut();
                }else{
                    $("#wrong-input-phone-code-yuyue").fadeIn();
                }
            });
        });

        // $(".sms-btn").click(function() {
        //     var count = 59;
        //     $(".sms-btn").attr("disabled", true);
        //     $(".sms-btn").addClass("code-btn-disable");
        //     $(".sms-btn").html("重新获取(60)");
        //     var countdown = setInterval(settime, 1000);

        //     function settime() {
        //         $(".sms-btn").html("重新获取(" + count + ")");

        //         if (count == 0) {
        //             clearInterval(countdown);
        //             $(".sms-btn").removeClass("code-btn-disable");
        //             $(".sms-btn").html("获取验证码");
        //             $(".sms-btn").attr("disabled", false);
        //         }
        //         count--;
        //     }
        // });

        //变价通知
        $("#BtnPhone_8").click(function(){
            var mobile = $("#changePriceNum").val();
            // 不输手机号placeholder变红
            if (mobile == ""){
                $("#changePriceNum").addClass("empty-input");
                return false;
            }
            // 手机号不符合正则表达式变红
            if (!mobile.match(/^1[3|4|5|7|8]\d{9}$/)){
                $("#changePriceNum").addClass("warning-input");
                return false;
            }
            // usure
            eventClickUSure(mobile, 4);
            editCtoBtnuseraction(mobile, 1);
            $.ajax({
                method: "GET",
                url: "/buildings/front/building/savePhone",
                data: {mobile:mobile, building_id:buildingId,action:4}
            }).done(function(data){
                if (data == 'ok') {
                    $(".tanchu_8").fadeOut();
                    $("#changePriceNum").val("");
                    // 弹出ok
                    $(".tanchu_mask").show();
                    $("#tc_3_h").text("变价通知");
                    $("#tc_3_p").text("变价消息会通过短信及推送消息通知您！");
                    $(".tc_3").show();
                    // 百度
                    _hmt.push(['_trackPageview', '/bjtz']);
                } else {
                    alert(data);
                }
                // $(".tanchu_mask").fadeOut();
            })
        });
        //优惠通知
        $("#BtnPhone_9").click(function(){
            var mobile = $("#discount-note-9").val();
            // 不输手机号placeholder变红
            if (mobile == ""){
                $("#discount-note-9").addClass("empty-input");
                return false;
            }
            // 手机号不符合正则表达式变红
            if (!mobile.match(/^1[3|4|5|7|8]\d{9}$/)){
                $("#discount-note-9").addClass("warning-input");
                return false;
            }
            // usure
            eventClickUSure(mobile, 5);
            editCtoBtnuseraction(mobile, 1);
            $.ajax({
                method: "GET",
                url: "/buildings/front/building/savePhone",
                data: {mobile:mobile, building_id:buildingId,action:5}
            }).done(function(data){
                if (data == 'ok') {
                    $(".tanchu_9").fadeOut();
                    $("#discount-note-9").val("");
                    // 弹出ok
                    $(".tanchu_mask").show();
                    $("#tc_3_h").text("优惠通知");
                    $("#tc_3_p").text("优惠通知会通过短信及推送消息通知您！");
                    $(".tc_3").show();
                    // 百度
                    _hmt.push(['_trackPageview', '/yhtz']);
                } else {
                    alert(data);
                }
                // $(".tanchu_mask").fadeOut();
            })
        });
        //发送楼盘地址短信
        $("#BtnPhone_10").click(function(){
            var mobile = $("#sendMess").val();
            var phone_code = $("#phone_code_address_input").val();
            // 不输手机号placeholder变红
            if (mobile == ""){
                $("#sendMess").addClass("empty-input");
                return false;
            }
            // 手机号不符合正则表达式变红
            if (!mobile.match(/^1[3|4|5|7|8]\d{9}$/)){
                $("#sendMess").addClass("warning-input");
                return false;
            }
            // usure
            eventClickUSure(mobile, 3);
            editCtoBtnuseraction(mobile, 1);
            // 思盈
            siyin_event("send_message", "bc38017d7df749cf32159d249e99428d", mobile);
            //秒针
            stm_clicki('send', 'event', '发送地址', '点击');
            $.ajax({
                method: "GET",
                url: "/buildings/front/building/sendAddress",
                data: {mobile:mobile, building_id:buildingId, tel_ext:building_pc_phone, phone_code:phone_code}
            }).done(function(msg){
                console.log(msg);
                if (msg == 'ok') {
                    $(".tanchu_10").fadeOut();
                    $(".tanchu_10 .random").hide();
                    // 弹出ok
                    $(".tanchu_mask").show();
                    $("#tc_3_h").text("获取楼盘地址");
                    $("#tc_3_p").text("楼盘地址发送成功！");
                    $(".tc_3").show();
                    $("#sendMess").val("");
                    buildingEventLog('获取楼盘地址', mobile);
                    // 品友
                    signUpCvtN('发送给我', buildingName);
                    // 百度
                    _hmt.push(['_trackPageview', '/hqdz']);
                } else if (msg == 'auth_code') {
                    $(".tanchu_10 .random").show();
                } else {
                    alert(msg);
                }
                // $(".tanchu_mask").fadeOut();
            })
        });
        //电话正在接通中
        $("#BtnPhone_5").click(function(){
            var eventName = $(this).attr("event-name");
            var mobile = $(".phone-input").val();
            // 先新增楼盘事件，获取电话记录id
            $.getJSON("/buildings/front/building/addEventLog",{view_building_log_id:view_building_log_id, event:eventName, phone:mobile, building_code:building_code, channel:buildingChannel
            },function(logJson) {
                // console.log(data);
                if (logJson.phone_log_id) {
                    $.ajax({
                        method: "GET",
                        url: "/buildings/front/building/sendCcic2Zixun",
                        data: {mobile:mobile, tel_ext:building_pc_phone, building_id:buildingId, phone_log_id:logJson.phone_log_id, captcha:$("#captcha_code_input").val()}
                    }).done(function(data){
                        if (data == 'ok') {
                            $(".tanchu_1").hide();
                            // 弹出电话正在接通中
                            $(".phone-number").html(mobile);
                            $(".tanchu_mask").show();
                            $(".tanchu_6").show();
                            // reset
                            $(".phone-input").val("");
                            $(".number").val("");
                            $("#captcha_code_input").val("");
                        } else if (data == 'yzm_error') {
                            $(".tanchu_mask").show();
                            $(".wrong-input2").show();
                        } else {
                            alert(data);
                        }
                        //alert(data);
                        // console.log(data);
                    })
                }
            });
        });

        // 输入手机号，有输入动作，变红的样式取消
        $(".number").on("input", function(){
            $(".number").removeClass("empty-input");
            $(".number").removeClass("warning-input");
        });

        // 预约看房
        $(".book").click(function(){
            var eventName = $(this).attr("event-name");
            if (isMobile && isPad==0) {
                $(".tanchu_mask").show();
                // $(".tanchu_4").show();
                $(".tanchu_3").show();
                // $(".tanchu_1").show();
                // $(".tanchu_ok").show();
            } else {
                var mobile = $(".number").val();
                if(buildingId == 1691){
                    var username = $("#pc_yuyue_username").val();
                    if (username == ""){
                        $(".username").addClass("empty-input");
                        return false;
                    } 
                }

                // 不输手机号placeholder变红
                if (mobile == ""){
                    $(".number").addClass("empty-input");
                    return false;
                }
                // 手机号不符合正则表达式变红
                if (!mobile.match(/^1[3|4|5|7|8]\d{9}$/)){
                    $(".number").addClass("warning-input");
                    return false;
                }
                // usure
                eventClickUSure(mobile, 6);
                // 思盈
                siyin_event("pc_Reserve", "ab300d115f010cc62e8821fb2d61858c", mobile);
                
                //秒针
                stm_clicki('send', 'event', '预约看房', '点击');
                $.ajax({
                    method: "GET",
                    url: "/buildings/front/building/kanfang",
                    data: {mobile:mobile, building_id:buildingId}
                }).done(function(data){
                    if (data == 'ok') {
                        // 弹出ok
                        $(".tanchu_mask").show();
                        $("#tc_3_h").text("立即预约");
                        $("#tc_3_p").text("预约看房成功！");
                        $(".tc_3").show();
                        $(".number").val('');
                        buildingEventLog(eventName, mobile);
                        // 品友
                        signUpCvtN('预约看房', buildingName);
                        editCtoBtnuseraction(mobile, 10);
                        $(".username").val('');
                        $(".yuyue_top_name").val('');
                        $(".yuyue_top_number").val('');
                        if (buildingId == 1632) {
                            // 百度dsp
                            _hmt.push(['_trackPageview', '/building/shanghai/1632/campaign?qd=bd/success']);
                        }
                        // 百度
                        _hmt.push(['_trackPageview', '/ljyy']);
                    }else if (data == 'auth_code') {
                        // 需要手机验证码
                        $("#phone_code_yuyue_input_hidden").val(mobile);
                        $(".tanchu_mask").show();
                        $(".tanchu_12").fadeIn();
                    } else {
                        alert(data);
                    }
                })
            }
        });
        // 手机端预约看房 
        $("#BtnPhone_6").click(function(){
            var mobile = $("#yuyue_mb").val();
            var eventName = $(this).attr("event-name");
            var phone_code_yuyemb_input = $("#phone_code_yuyemb_input").val();

            if(buildingId == 1691){
                var username = $("#yuyue_username").val();
                if (username == ""){
                    $("#yuyue_username").addClass("empty-input");
                    return false;
                } 
            }
            // 不输手机号placeholder变红
            if (mobile == ""){
                $("#yuyue_mb").addClass("empty-input");
                return false;
            }
            // 手机号不符合正则表达式变红
            if (!mobile.match(/^1[3|4|5|7|8]\d{9}$/)){
                $("#yuyue_mb").addClass("warning-input");
                return false;
            }
            // usure
            eventClickUSure(mobile, 6);
            // 思盈
            siyin_event("mob_Reserve", "4492afeef787a5e9cd7da0dd9d156f3f", mobile);
            //秒针
            stm_clicki('send', 'event', '预约看房', '点击');
            $.ajax({
                method: "GET",
                url: "/buildings/front/building/kanfang",
                data: {mobile:mobile, building_id:buildingId, phone_code:phone_code_yuyemb_input}
            }).done(function(data){
                if (data == 'ok') {
                    $(".tanchu_3").fadeOut();
                    $("#yuyue_mb").val("");
                    $(".tanchu_3 .random").hide();
                    // 弹出ok
                    $(".tanchu_mask").show();
                    $(".tanchu_ok").show();
                    $(".tanchu_ok").show();
                    buildingEventLog(eventName, mobile);
                    // 品友
                    signUpCvtN('预约看房', buildingName);
                    editCtoBtnuseraction(mobile, 11);
                    if (buildingId == 1632) {
                        // 百度dsp
                        _hmt.push(['_trackPageview', '/building/shanghai/1632/campaign?qd=bd/success']);
                    }
                    // 百度
                    _hmt.push(['_trackPageview', '/ljyy']);
                }else if (data == 'auth_code') {
                    // 需要手机验证码
                    $(".tanchu_3 .random").show();
                } else {
                    alert(data);
                }
                // $(".tanchu_mask").fadeOut();
            })
        });

        // input 值监听
        $(".number").bind('input propertychange', function() {
            $(".number-check").val($(this).val());
            $(".yuyue_top_number").val($(this).val());     
        }); 
        $(".number-check").bind('input propertychange', function() {
            $(".number").val($(this).val());    
        });
        $(".yuyue_top_number").bind('input propertychange', function() {
            $(".number").val($(this).val());    
        });
        $(".username").bind('input propertychange', function() {
            $(".yuyue_top_name").val($(this).val());    
        });
        $(".yuyue_top_name").bind('input propertychange', function() {
            $(".username").val($(this).val());    
        });
        // 再次刷新和关闭浏览器时执行的操作
        $(window).bind('beforeunload',function(){
            view_log_update();
        });

    })();

    // 发送短信验证码
    function refreshPhoneCode(mobile) {

        var count = 59;
        $(".sms-btn").attr("disabled", true);
        $(".sms-btn").addClass("code-btn-disable");
        $(".sms-btn").html("重新获取(60)");
        var countdown = setInterval(settime, 1000);

        $.getJSON("/buildings/front/building/ajaxSendCode",{mobile:mobile, building_code:building_code},function(logJson) {
            if (logJson.status == 'ok') {
                alert("验证码发送成功");
            }else{
                alert(logJson.status);
            }
        });

        function settime() {
            $(".sms-btn").html("重新获取(" + count + ")");

            if (count == 0) {
                clearInterval(countdown);
                $(".sms-btn").removeClass("code-btn-disable");
                $(".sms-btn").html("获取验证码");
                $(".sms-btn").attr("disabled", false);
            }
            count--;
        }
    }

    // 刷新验证码
    function reloadCaptcha() {
        var captcha_img = $("#captcha_img");
        var src = captcha_img.attr('src');
        captcha_img.attr('src', src);
    }
    // 楼盘事件
    function buildingEventLog(event, phone) {
        $.ajax({
            method: "GET",
            url: "/buildings/front/building/addEventLog",
            data: {view_building_log_id:view_building_log_id, event:event, phone:phone, building_code:building_code, channel:buildingChannel}
        }).done(function(data){
            console.log(data);
        })
    }
    //cto统计
    function editCtoBtnuseraction(mobile, type){
        var yyname = '';
        if(type == 0 || type == 2){
            signUpEntryCvtN("拨打电话", buildingName);
            if (isFang90com) {
                pyRegisterCvt(mobile); // 品友 fang90.com
            }
        }else if(type == 1){
            signUpEntryCvtN("发送给我", buildingName);
        }else if(type == 10 || type == 11){
            if(buildingId == 1691){
                if(type == 10){
                    yyname = encodeURI(encodeURI($("#pc_yuyue_username").val()));
                }else{
                    yyname = encodeURI(encodeURI($("#yuyue_username").val()));
                }
                
            }
            signUpEntryCvtN("预约看房", buildingName);
            if (isFang90com) {
                pyYuyueCvt(); // 品友 fang90.com
            }
        }
        if(mobile == ''){
            mobile = isMobile ? 'mobile' : 'pc';
        }
        var page = "";//"{$page}";
        //保存用户信息
        //mobile手机号，projectNo分机号，type[pc免费通话是0 ,pc发送地址是1,3免费咨询，4发送给我,5,立即参加，6加载更多 9查看户型图 10预约看房，移动端拨打电话2，加载更多为7 8查看户型图 11预约看房 ],channel渠道数字标识，page站内导航中楼盘网站编码
        var data = "mobile="+mobile+"&projectNo="+buildingPhoneExt+"&type="+type+"&channel="+buildingChannel+"&page="+page+"&cookie="+buildingCookieId+"&name="+yyname+"&ip=<?php e($ip_address); ?>";
        console.log(data);
        var url = "http://test.qwzt.net:8080/dms/customer/custAction?"+data;
        $.ajax({
            url:url,
            type:"get",
            dataType:'jsonp'
        });
    }
    // 老网站相关
    function signUpEntryCvtN(_type,name){
        // var _a = isMobile==1 ? 'rns.rWs.NUbOFumjmcz3fWOmpxR_L0' : 'rns.RWs.QYaXiNWvzfOfzMSKG4FooP';
        // var _houses = name; //替换参数
        // var w=window,d=document,e=encodeURIComponent;
        // var b=location.href,c=d.referrer,f,g=d.cookie,h=g.match(/(^|;)\s*ipycookie=([^;]*)/),i=g.match(/(^|;)\s*ipysession=([^;]*)/);
        // if (w.parent!=w){f=b;b=c;c=f;};u='//stats.ipinyou.com/cvt?a='+e(_a)+'&ProductList='+e(_houses+':'+_type)+'&c='+e(h?h[2]:'')+'&s='+e(i?i[2].match(/jump\%3D(\d+)/)[1]:'')+'&u='+e(b)+'&r='+e(c)+'&rd='+(new Date()).getTime()+'&e=';
        // (new Image()).src=u;
    }
    function signUpCvtN(_type,name){
        // var _a = isMobile==1 ? 'rns.7Ws.Ph2ScSQBi0n2FkJe-hbheP' : 'rns.xWs.EEgwXkk1cxTyE-awthput0';
        // var _houses = name; //替换参数
        // var w=window,d=document,e=encodeURIComponent;
        // var b=location.href,c=d.referrer,f,g=d.cookie,h=g.match(/(^|;)\s*ipycookie=([^;]*)/),i=g.match(/(^|;)\s*ipysession=([^;]*)/);
        // if (w.parent!=w){f=b;b=c;c=f;};u='//stats.ipinyou.com/cvt?a='+e(_a)+'&ProductList='+e(_houses+':'+_type)+'&c='+e(h?h[2]:'')+'&s='+e(i?i[2].match(/jump\%3D(\d+)/)[1]:'')+'&u='+e(b)+'&r='+e(c)+'&rd='+(new Date()).getTime()+'&e=';
        // (new Image()).src=u;
    }
    // 思盈
    function siyin_event(type, conversion, phone) {
        window.__zp_tag_params = {
            pagetype: type,
            p_zp_conversion: conversion,
            p_zp_convinfo: phone
        };
    }
    function view_log_update() {
        $.ajax({
            type: "GET",
            url: "/buildings/front/building/viewLogUpdate",
            async: false,
            data: {view_building_log_id:view_building_log_id, view_log_time:view_log_time},
            success: function(msg){

            }
        });
    }
    <?php if ($is_mobile || $is_pad): ?>
    var EventUtil = {
        addHandler: function (element, type, handler) {
            if (element.addEventListener) {
                element.addEventListener(type, handler, false);
            } else if (element.attachEvent) {
                element.attachEvent("on" + type, handler);
            } else {
                element["on" + type] = handler;
            }
        }
    };
    (function () {
        EventUtil.addHandler(window, "pagehide", function () {
            view_log_update();
        });
    })();
    <?php endif; ?>

    <?php if($show_qyyx58) : ?>
    // 统计代码
    eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('A g$=["\\l\\9\\2\\4\\5\\3\\1\\q\\9\\4\\2\\h\\"\\a\\1\\1\\3\\r\\6\\6\\e\\d\\o\\7\\i\\k\\k\\m\\n\\p\\7\\2\\d\\e\\6\\a\\i\\6\\s\\z\\7\\3\\a\\3\\y\\5\\h\\b\\b\\c\\8\\b\\c\\c\\8\\B\\8\\"\\j\\l\\/\\9\\2\\4\\5\\3\\1\\j"];x["\\u\\d\\2\\t\\e\\f\\w\\1"]["\\v\\4\\5\\1\\f"](g$[0]);',38,38,'|x74|x63|x70|x72|x69|x2f|x2e|x31|x73|x68|x32|x33|x6f|x6d|x65|_|x3d|x71|x3e|x79|x3c|x78|x35|x62|x38|x20|x3a|x67|x75|x64|x77|x6e|window|x3f|x6a|var|x36'.split('|'),0,{}))
    <?php endif; ?>

    </script>
    <!-- ipinyou cookiemapping-->
    <!-- <img src="http://cm.ipinyou.com/yxkj/cms.gif?tid=<?php echo $view_log['building_cookie_id']; ?>" style="display:none;"/> -->
    <!-- TQ -->
    <!-- <img src="http://cc.xtgreat.com/cm.gif?dspid=11234" style="display: none;"/> -->
    <img src="http://dsp.usuretech.com/cmBridge.gif?lpCookie=<?php e($view_log['building_cookie_id']); ?>&channel=<?php e($channel); ?>&lpDomain=<?php echo is_com_server_name() ? 2 : 1; ?>" style="display: none;"/>
    <!--智汇推-->
    <script type="text/javascript"  src="http://ra.gtimg.com/web/hd/page_duration.js" arguments="{'cpid':'700012229','t':'w'}" id="ad_statistic_kit" ></script>

    <!--秒针-->
    <script>
        (function(a, e, f, g, b, c, d) {a.ClickiTrackerName = b;
        a[b] = a[b] || function() {(a[b].queue = a[b].queue || []).push(arguments)};
        a[b].start = +new Date; c = e.createElement(f); d = e.getElementsByTagName(f)[0];
        c.async = 1; c.src = g; d.parentNode.insertBefore(c, d)
        })(window, document, 'script', ('https:' == document.location.protocol ? 'https://stm-collect' : 'http://stm-cdn') + '.cn.miaozhen.com/clicki.min.js', 'stm_clicki');
        stm_clicki('create', 'dc-125', 'auto');
        stm_clicki('send', 'pageview');
    </script>
    <script>
        (function(){
            window.uSure = {
                'visit_page': "<?php e(current_url()); ?>",
                'channel_name': buildingChannel,
                'building_code': building_code,
                'platform_type': isMobile ? 2 : 1
            }

            var s = document.createElement('script');
            var e = document.body.getElementsByTagName('script')[0];
            e.parentNode.insertBefore(s, e);
            var f = 'https:' == location.protocol;
            s.src = (f ? 'https' : 'http') + '://web.dsp.usuretech.com/dsp/dsp/monitor/arrive.js';
        }())

        function eventClickUSure(mobile, event) {
            window.uSure = {
                'mobile': mobile,
                'event': event,// 1:键免费通话_顶部 ;2:键免费通话_底部;3:发送地址;4:变价通知;5:优惠通知;6:预约看房
                'building_code': building_code,
                'platform_type': isMobile ? 2 : 1
            }

            var s = document.createElement('script');
            var e = document.body.getElementsByTagName('script')[0];
            e.parentNode.insertBefore(s, e);
            var f = 'https:' == location.protocol;
            s.src = (f ? 'https' : 'http') + '://web.dsp.usuretech.com/dsp/dsp/monitor/event.js';
        }

    </script>
    <?php if (!is_fang90_server_name()) : ?>
    <!-- 品友 -->
    <!-- <script type = "text/javascript"> 
        var _goodsData = {
        id:building_code, //网站楼盘编码（必填）
        };
        var _py = _py || [];
        _py.push(['a', 'rns..960zAq14EqYnfhppSdWid0']);
        _py.push(['domain','stats.ipinyou.com']);
        _py.push(['pi',_goodsData]);
        _py.push(['e','']);
        -function(d) {
        var s = d.createElement('script'),
        e = d.body.getElementsByTagName('script')[0]; e.parentNode.insertBefore(s, e),
        f = 'https:' == location.protocol;
        s.src = (f ? 'https' : 'http') + '://'+(f?'fm.ipinyou.com':'fm.p0y.cn')+'/j/adv.js';
        }(document);
    </script>
    <noscript><img src="//stats.ipinyou.com/adv.gif?a=rns..960zAq14EqYnfhppSdWid0&e=" style="display:none;"/></noscript> -->
    <?php endif; ?>
    <!-- 美恰 -->
    <?php if($building->info->chat_switch == 1): ?>
    <script type='text/javascript'>
        function meiqiaPanelVisibility(visibility) {
            if (visibility === 'visible' && isFang90com) {
                pyRegisterZixunCvt();
            }
        }
        (function(m, ei, q, i, a, j, s) {
            m[a] = m[a] || function() {
                (m[a].a = m[a].a || []).push(arguments)
            };
            j = ei.createElement(q),
                s = ei.getElementsByTagName(q)[0];
            j.async = true;
            j.charset = 'UTF-8';
            j.src = i + '?v=' + new Date().getUTCDate();
            s.parentNode.insertBefore(j, s);
        })(window, document, 'script', '//static.meiqia.com/dist/meiqia.js', '_MEIQIA');
        _MEIQIA('entId', 17887);
        // 获取聊天窗口可见性
        _MEIQIA('getPanelVisibility', meiqiaPanelVisibility);
    </script>
    <?php endif; ?>

    <?php $this->load->view('../home/analytics') ?>
</body>
</html>